home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / print / gs261sr4.zip / PS2ASCII < prev    next >
Text File  |  1992-11-17  |  573b  |  14 lines

  1. #!/bin/sh -f
  2. # Extract ASCII text from a PostScript file.  Usage:
  3. #    ps2ascii [infile.ps [outfile.txt]]
  4. # If outfile is omitted, output goes to stdout.
  5. # If both infile and outfile are omitted, ps2ascii acts as a filter,
  6. # reading from stdin and writing on stdout.
  7. if ( test $# -eq 0 ) then
  8.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps - quit.ps
  9. elif ( test $# -eq 1 ) then
  10.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps $1 quit.ps
  11. else
  12.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps $1 quit.ps >$2
  13. fi
  14.